#region license
# This file is part of Grawlix.
# 
# Grawlix is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
# 
# Grawlix is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public
# License along with Grawlix.  If not, see
# <http://www.gnu.org/licenses/>.
#endregion

"""
A particular series of frames representing a motion
for an object facing a particular direction.
"""

namespace Grawlix.Services.Rendering
#import Grawlix

interface ISpriteFacing:
"""
A set of frames used for the initial animation.
This class lays an animation out in a grid:

	|===|===|===|
	| 1 | 2 | 3 |
	|===|===|===|
	| 4 | 5 | 6 |
	|===|===|===|
"""
	
	/*	
	override def ToString():
	"""
	Get a string representation for this object.
	Returns: A string representation for this object.
	"""
		return "AnimationFacing ${_texture}"
	
	[property(Texture)]
	private _texture as ITextureResource
	"""Texture is the source image to use."""
	
	[property(FirstFrame)]
	private _firstFrame = Rect()
	"""
	FirstFrame is a rect representing the boundaries of frame 1
		within the texture. It is designated in pixels.
	"""
	
	[property(FrameCount)]
	private _frameCount as int
	"""
	FrameCount specifies the number of frames within the animation.
		In a 5-frame animation based upon a 3x2 grid, it would be 5.
	"""
	
	[property(FramesPerRow)]
	private _framesPerRow as int
	"""
	FramesPerRow specifies the horizontal dimensions of the grid.
		In a 5-frame animation based upon a 3x2 grid, it would be 3.
	"""
	
	[property(Angle)]
	private _angle as double = 0
	"""
	Angle specifies the approximate angle that the image in the animation
		faces. It is used to match the closest AnimationFacing within
		an Animation to the angle an object is facing.
	"""
	
	*/
	
	Angle as double:
	"""
	Angle specifies the approximate angle that the image in the animation
		faces. It is used to match the closest AnimationFacing within
		an Animation to the angle an object is facing.
	"""
		get
	